/*
* ========== Copyright Header Begin ==========================================
* 
* OpenSPARC T1 Processor File: options.h
* Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* 
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* 
* The above named program is distributed in the hope that it will be 
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
* 
* You should have received a copy of the GNU General Public
* License along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* 
* ========== Copyright Header End ============================================
*/
/*
 * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef	_OPTIONS_H_
#define	_OPTIONS_H_

#pragma ident	"@(#)options.h	1.13	06/03/29 SMI"

#ifdef __cplusplus
extern "C" {
#endif

#include "list.h"

	/*
	 * Simulator options - gleaned from the argv list, or later modified
	 * via CLI commands.
	 */

typedef struct {
	char * cpp_optionsp;	/* CPP options for pre-processing the config files */
	char * config_filep;	/* configuration file name */

	int	accept_port;	/* Socket to accept debugger / CLI connections */
	bool_t	specific_port;	/* true if -p option specified by user */
	int	port_retry_max;	/* Max no of retries on new ports if busy */
	bool_t	flag_auto_start;/* If true start exection immediately - dont wait for the debugger */
	bool_t	analyzer;	/* If true enable logic analyzer mode */
	bool_t	magic_traps;	/* If true allow "magic" traps */
	int	buffersz;	/* Set size of log buffer, 0 = line buffering */
	char *	bufferp;	/* pointer to that buffer if size > 0 */
	int	threads;	/* Number of simcpu execution threads */
	bool_t	verbose;	/* determine whether to print all messages or not */


	LIST_DEF(libpath, char);	/* list of search paths */
} options_t;

extern options_t options;

extern bool_t process_opts(int argc, char ** argv);

extern void banner_print();
extern void version_print();
extern void consolidate();

#ifdef __cplusplus
}
#endif

#endif	/* !_OPTIONS_H_ */
